package com.thd.springboottest.ioc.attributeinject;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class StaticAttributeInject {
    private static InjectedBeana staticAttributeBeana;
    private static InjectedBeanb staticAttributeBeanb;
    @Autowired
    public void setStaticAttributeBean(InjectedBeana staticAttributeBean) {
        StaticAttributeInject.staticAttributeBeana = staticAttributeBean;
    }
    @Autowired
    public StaticAttributeInject(InjectedBeanb staticAttributeBean) {
        StaticAttributeInject.staticAttributeBeanb = staticAttributeBean;
    }
    public static String myMethoda(){
        System.out.println(" StaticAttributeRegista.myMethoda() ");
        StaticAttributeInject.staticAttributeBeana.gogogo();
        return "Hello World!";
    }
    public static String myMethodb(){
        System.out.println(" StaticAttributeRegista.myMethodb() ");
        StaticAttributeInject.staticAttributeBeanb.gogogo();
        return "Hello World!";
    }
}
